@import 'styles/settings';
@import 'styles/ui.module';
@import 'styles/typography-extends';

.speciesModal {
  height: 100%;
  left: 0;
  overflow-y: scroll;
  top: 0;
  width: 100vw;
  z-index: 11;

  @media #{$tablet-portrait} {
    background-color: $modal-light-background;
    height: 100vh;
    overflow-y: unset;
    position: absolute;
  }

  .grid {
    @media #{$tablet-portrait} {
      padding: 70px 5% 50px;
      height: 100%;
    }
  }

  .title {
    @extend %headline;
  }

  .summary,
  .search {
    font-family: $font-family-1;
    font-size: $font-size-xs;
    margin-bottom: 25px;
  }

  .closeButton {
    svg g {
      fill: $brand-color-secondary;
      stroke: $brand-color-secondary;
      height: 22px;
      width: 22px;
    }

    &:hover svg g {
      fill: $brand-color-secondary-hover;
      stroke: $brand-color-secondary-hover;
    }
  }

  .section {
    display: flex;
    justify-content: space-between;
  }

  .tableHeaderContainer {
    min-height: 60px;
    padding: 15px 74px 15px 40px;
    background-color: $white;
    padding-top: 30px;
    border-radius: 5px 5px 0 0;
    margin-bottom: 2px;
  }

  .tableHeader {
    display: flex;
  }

  .tableHeaderItem {
    color: $_temporary-light-text;
    @extend %subtitle;
    text-align: left;
    width: 20%;
    padding-right: 60px;

  }

  .arrowUp {
    top: -3px;
  }


  .tableRowContainer {
    display: flex;
    position: relative;
    min-height: 50px;
    width: 100%;
    background-color: $white;
    border: solid $alto;
    border-width: 2px 0;
  }

  .tableRow {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .arrowIcon {
    fill: $_temporary-dark-text;
    transform: rotate(90deg);

    &.isOpened {
      transform:rotate(-90deg);
    }

    transition: transform 0.2s ease;
  }

  .mainInfo {
    display: flex;
    padding: 0 40px;
    align-items: center;
    min-height: 50px;

    @extend %bodyText;
    color: $_temporary-dark-text;

    &.isOpened, &:hover {
      background-color: $athens-gray;
    }
  }

  .expandedInfo {
    max-height: 0;
    opacity: 0;

    &.isOpened {
      opacity: 1;
      max-height: 600px;
    }

    transition: all 0.5s ease;
  }

  .tableItem {
    width: 20%;
    text-align: left;

    &.bold {
      font-family: $font-family-1;
      font-weight: $font-weight-bold;
    }
    &.italic {
      font-style: italic;
    }
  }

  .loader {
    background-color: $white;
    display: flex;
    justify-content: center;
  }

  .searchInput {
    @extend %_temporaryTitle;
    background-color: $modal-light-background;
    min-width: 300px;
    border: none;
    margin-left: 1em;
    color: $_temporary-dark-text;
  }

  .searchIcon {
    transform: translate(0, 9px) scale(0.5);

    g {
      stroke: $_temporary-dark-text;
    }
  }

  .groupColor {
    position: absolute;
    width: 6px;
    top: 0;
    left: 0;
    height: 100%;
    border-left: 2px solid $alto;

    &.mammals {
      background-color: $mammals-color;
    }

    &.amphibians {
      background-color: $amphibians-color;
    }

    &.reptiles {
      background-color: $reptiles-color;
    }

    &.birds {
      background-color: $birds-color;
    }
  }
}

.expandedButton {
  padding: 0;
}
